1. Field of the Invention
The present invention relates generally to an auto white balance (AWB) technology which is a color temperature correction technology in a built-in camera of a portable terminal; and in particular, to a method and apparatus for preventing a color correction error for an AWB when a single color is input to a major part of a window of an imaging device such as a charge-coupled device (CCD) of the built-in camera when taking a picture with a portable terminal.
2. Description of the Related Art
Portable terminals such as a mobile communication terminal, personal digital assistants (PDAs), an MP3 (MPEG layer-3) player and electronic notebook are widely used. Applications for these devices are continually widening. For example, portable terminals can provide a number of functions including, but not limited to, telephone call function, scheduling function, image photographing function using a built-in camera, satellite broadcasting service, document editing function and game function.
A built-in digital camera in a portable terminal is configured to digitize ambient light reflected from an object through its lens. Due to influence of the light source, shades of blue are changed into blue and shades of red are changed into red. Accordingly, the digital camera has to express color temperature independently of the ambient light source. For this purpose, the portable terminal having a built-in camera performs an auto white balance (AWB) function on an image. The AWB is automatic color temperature correction or compensation.
A built-in camera in a portable terminal will be described below with reference to FIG. 1 which illustrates a conventional built-in camera in a portable terminal.
Referring to FIG. 1, the camera includes a sensing unit 100, a black level and crop unit 102, a defect correction unit 104, a demosaic unit 106, a white balance correction unit 108, a gamma correction unit 110, and a color conversion unit 112.
The sensing unit 100 is an imaging device (e.g., a charge coupled device (CCD) or complementary metal oxide semiconductor (CMOS) image sensor) designed to receive optical signal from an object and convert the optical signal into an electric signal. The electrical signal includes red (R), green (G), and blue (B) channels.
The black level and crop unit 102 corrects errors in the overall brightness of an image.
The defect correction unit 104 searches defective pixels among pixels having a zero level obtained by screening light just before receiving the light and determines the positions of the pixels, and then corrects values of the already-known defective pixels with respect to the image obtained by receiving the light.
The demosaic unit 106 converts an RGB pattern of a bayer form into an RGB form of independent channels.
The white balance correction unit 108 extracts video signals from a CCD window that can be regarded as gray, divides the extracted signal into R and B components of an average signal, and then determines a color temperature according to a component ratio. Additionally, the gain of the R and B components in the video signal is controlled to follow a locus of the color temperature change in black body radiation, and to allow the ratio of R and B to be one. AWB performs a color temperature correction in comparison with an average signal value in a white portion and a reference signal value corresponding to R−B=0 in a color temperature.
An appropriate gamma factor is applied to compensate for actual human eye color sensation in the gamma correction unit 110 because color sense varies according to the properties of the gamma correction unit 110 and the sensing unit 100.
The color conversion unit 112 converts image data of an RGB pattern into YUV format that represents three information (Y: brightness signal, U: difference of signal brightness and a red component, V: difference of signal brightness and a blue component).
A stand-alone digital camera includes an additional hardware component for color correction to output a natural image. Unlike the digital camera, the portable terminal with a built-in camera performs AWB using software rather than an additional component for color correction. Thus, AWB of the terminal misjudges colors that occupy a major portion of a gray screen (window) in during a close shot or when capturing the sea, sky, grass, or forest. This causes color correction errors.
A single color in which color correction errors may easily occur is a yellow or green. That is, when a green or a yellow color occupies an entire screen when taking a picture of grass or human face, AWB performs color sense correction by treating colors other than white as a white color. Accordingly, due to the color correction error, an unnatural image may be displayed.
Furthermore, since conventional AWB of the portable terminal performs a color temperature correction on an image that does not require the color temperature correction, an unnatural image may also be displayed.
Therefore, AWB needs to determine whether a color temperature correction is required or not, and then measure an accurate gray for performing a color temperature correction without an additional hardware device.